#ifndef SMOOTHWIDGET_H
#define SMOOTHWIDGET_H

#include <QWidget>
#include <QPaintEvent>
#include <QPainter>
#include <QDateTime>
#include <QPainterPath>
#include <smoothcurve.h>

QT_BEGIN_NAMESPACE
namespace Ui { class SmoothWidget; }
QT_END_NAMESPACE

class SmoothWidget : public QWidget
{
    Q_OBJECT

public:
    SmoothWidget(QWidget *parent = nullptr);
    ~SmoothWidget();

protected:
    void paintEvent(QPaintEvent *event);

private:
    Ui::SmoothWidget *ui;

    QVector<QPointF> datas;     //曲线上的点
    QPainterPath pathNormal;    //正常曲线
    QPainterPath pathSmooth1;   //平滑曲线1
    QPainterPath pathSmooth2;   //平滑曲线2
};
#endif // SMOOTHWIDGET_H
